Skip to content

[GEN][ZH] Fix crash when launching the game with an unsupported Display Resolution or when the graphics adapter does not support 800 x 600 #1055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

xezon
Copy link

@xezon xezon commented Jun 12, 2025

This change prevents the game from crashing when launching with an unsupported Display Resolution or when the graphics adapter does not support 800 x 600, because that is the default game creation resolution.

@xezon xezon requested a review from a team June 12, 2025 17:33
@xezon xezon added Blocker Severity: Minor < Major < Critical < Blocker Bug Something is not working right, typically is user facing Gen Relates to Generals ZH Relates to Zero Hour Crash This is a crash, very bad labels Jun 12, 2025
@xezon xezon added this to the Stability fixes milestone Jun 12, 2025
Copy link

@Mauller Mauller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but needs some functional changes and removal of magic numbers that were previously defined.

Comment on lines 693 to 694
const Int minW = 800;
const Int minH = 600;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minW = MIN_DISPLAY_RESOLUTION_X;
minH = MIN_DISPLAY_RESOLUTOIN_Y;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Also fixed the typing error in RESOLUTOIN

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did not notice that at first, i was just copying the defines

@xezon xezon force-pushed the xezon/fix-unsupported-resolution-crash branch from 6dc2258 to d0379b5 Compare June 22, 2025 05:24
Copy link

@Mauller Mauller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@xezon xezon merged commit a017743 into TheSuperHackers:main Jun 24, 2025
14 checks passed
@xezon xezon deleted the xezon/fix-unsupported-resolution-crash branch June 24, 2025 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker Severity: Minor < Major < Critical < Blocker Bug Something is not working right, typically is user facing Crash This is a crash, very bad Gen Relates to Generals ZH Relates to Zero Hour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Game crashes on full screen launch if game creation resolution is not supported by the graphics adapter
3 participants